{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\61.172.229.23_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\hkbgpmuji_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\miduhk1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc a\\akhkdc1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc a\\akhkdc2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc a\\akhkdc3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc a\\akhkdc4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc b\\akhkdc1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc b\\akhkdc2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc b\\akhkdc3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc b\\akhkdc4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc e\\akhkdc11_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc e\\akhkdc12_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc e\\akhkdc13_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\dc\\dc e\\akhkdc14_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wlGss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wlGvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wliss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wlivm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wlss1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wlss2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wlss3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wlvm1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wlvm2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\hk\\wl\\akhk-wlvm3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc a\\aksg-dc1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc a\\aksg-dc2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc a\\aksg-dc3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc a\\aksg-dc4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc a\\aksg-dc5_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc b\\dc1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc b\\dc2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc b\\dc3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc b\\dc4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc b\\dc5_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc e\\aksg-dc11_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc e\\aksg-dc12_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc e\\aksg-dc13_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc e\\aksg-dc14_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\dc\\dc e\\aksg-dc15_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlAss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlAvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlCss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlCvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlEss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlEvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlGss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlGvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlIss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\sg\\wl\\aksg-wlIvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc a\\aktwdc1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc a\\aktwdc2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc a\\aktwdc3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc a\\aktwdc4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc a\\aktwdc5_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc b\\aktwdc1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc b\\aktwdc2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc b\\aktwdc3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc b\\aktwdc4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc b\\aktwdc5_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc e\\aktwdc11_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc e\\aktwdc12_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc e\\aktwdc13_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc e\\aktwdc14_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\dc\\dc e\\aktwdc15_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wlAss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wlAvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wlCss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wlCvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wlEss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wlEvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wlGss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wlGvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wliss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\tw\\wl\\aktw-wlivm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\vpn\\mo_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\vpn\\my_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\Ak\\vpn\\tur_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\ali\\233hosts_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\ali\\duangcloud_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\ali\\jinyun_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\ali\\linkcloud_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\ali\\midu_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\ali\\riven_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\ali\\wallless_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\he-pve_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc a\\he-dc1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc a\\he-dc2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc a\\he-dc3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc a\\he-dc4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc a\\he-dc5_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc b\\he-dc10_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc b\\he-dc6_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc b\\he-dc7_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc b\\he-dc8_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc b\\he-dc9_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc e\\hedc11_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc e\\hedc12_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc e\\hedc13_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc e\\hedc14_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\dc\\dc e\\hedc15_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wlAss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wlAvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wlCss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wlCvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wlEss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wlEvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wlGss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wlGvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wliss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\apernet\\wl\\he-wlivm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\111111_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\wfw-mxzc2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\wfw-mxzc_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\wfw_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\浦发正式新_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\浦发测试新_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\邮储PVE_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\邮储正式_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\邮储测试数据库_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\邮储测试环境_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\mxzc正式\\119.23.61.173_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\byd\\mxzc正式\\39.108.100.74_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\hkt\\hkt1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\hkt\\idcdo\\hkt1g\\VM1538_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\hkt\\idcdo\\hkt1g\\VM1539_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk1\\101_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk1\\102_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk1\\103_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk1\\104_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk1\\105_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk2\\106_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk2\\107_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk2\\108_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk2\\109_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkdc\\hk2\\110_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\23.26.223.22_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk1\\hk1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk1\\hk2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk1\\hk3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk1\\hk4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk1\\hk5_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk2\\hk1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk2\\hk2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk2\\hk3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk2\\hk4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\hkwl\\hk2\\hk5_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gz\\120.241.225.89_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gz\\120.241.225.90_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gz\\120.241.225.91_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gz\\120.241.225.92_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gz\\120.241.225.93_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gzct\\183.2.154.10_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gzct\\183.2.154.11_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gzct\\183.2.154.12_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gzct\\183.2.154.13_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-gzct\\183.2.154.9_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-sz\\120.232.63.26_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-sz\\120.232.63.27_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-sz\\120.232.63.28_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-sz\\120.232.63.29_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-dc-sz\\120.232.63.30_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gz\\120.241.225.84_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gz\\120.241.225.85_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gz\\120.241.225.86_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gz\\120.241.225.87_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gz\\120.241.225.88_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gzct\\183.2.154.4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gzct\\183.2.154.5_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gzct\\183.2.154.6_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gzct\\183.2.154.7_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-gzct\\183.2.154.8_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-sz\\120.232.63.20_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-sz\\120.232.63.21_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-sz\\120.232.63.22_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-sz\\120.232.63.23_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-wl-sz\\120.232.63.24_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-沪日-日\\46.232.52.131_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-沪日-日\\46.232.52.132_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-沪日-日\\46.232.52.133_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-沪日-日\\46.232.52.134_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-沪日-沪\\203.156.197.248_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-沪日-沪\\203.156.197.249_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-沪日-沪\\203.156.197.250_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\lz-沪日-沪\\203.156.197.251_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\qyy-small\\120.232.218.51_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\qyy-small\\120.232.218.56_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\qyy-small\\120.232.218.57_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\iepl\\qyy-small\\120.232.239.248_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\mysql_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\suqian_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-pro_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-test_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\翼龙_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\上海电信\\上海电信11_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\上海电信\\上海电信1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\上海电信\\上海电信2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\上海电信\\上海电信3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\上海电信\\上海电信4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\宿迁\\宿迁1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\宿迁\\宿迁2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\宿迁\\宿迁3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\宿迁\\宿迁4_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\宿迁\\宿迁5_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\深圳电信\\深圳电信1_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\深圳电信\\深圳电信2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\jsrf\\yl-server\\深圳电信\\深圳电信3_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\linode\\linode-au_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\linode\\linode-ca_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\linode\\linode-in_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\linode\\linode-uk_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dc b\\jpdc06_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dc b\\jpdc07_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dc b\\jpdc08_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dc b\\jpdc09_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dc b\\jpdc10_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dca\\jpdc01_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dca\\jpdc02_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dca\\jpdc03_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dca\\jpdc04_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dca\\jpdc05_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dce\\jpdc11_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dce\\jpdc12_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dce\\jpdc13_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dce\\jpdc14_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\dc\\dce\\jpdc15_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wlass_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wlavm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wlcss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wlcvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wless_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wlevm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wlGss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wlGvm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wliss_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\rabbit\\jp\\wl\\jp-wlivm_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\unlock\\bestvm-jp_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\unlock\\tokyonline_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\unlock\\itox\\gpt1wl_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\unlock\\itox\\gpt2dc_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\unlock\\itox\\hk_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\unlock\\itox\\JP_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\unlock\\itox\\sg_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\vu\\233.mx_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\vu\\44i.im_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\vu\\dc e_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\vu\\dc2_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\vu\\dc_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\vu\\wl_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\小众地区\\ar_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\小众地区\\ph_connect_config.json\n",
      "\n",
      "C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10\\小众地区\\tur_connect_config.json\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import os\n",
    "import json\n",
    "import requests\n",
    "target_path = r'C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\FinalShell4.3.10'\n",
    "rs_df = pd.DataFrame()\n",
    "def get_ip_info(ip_address):  \n",
    "    # 调用 ip-api.com API 获取 IP 信息  \n",
    "    try:  \n",
    "        response = requests.get(f'http://ip-api.com/json/{ip_address}?lang=zh-CN')  \n",
    "        response.raise_for_status()  # 检查请求是否成功  \n",
    "        ip_info = response.json()  \n",
    "        \n",
    "        # 检查 API 返回的状态  \n",
    "        if ip_info['status'] == 'fail':  \n",
    "            return f\"无法获取 IP 地址 {ip_address} 的信息: {ip_info['message']}\"  \n",
    "        \n",
    "        return ip_info  \n",
    "    except requests.exceptions.HTTPError as http_err:  \n",
    "        return f\"HTTP 错误: {http_err}\"  \n",
    "    except Exception as err:  \n",
    "        return f\"发生错误: {err}\" \n",
    "for root, dirs, files in os.walk(target_path):\n",
    "    for file in files:\n",
    "        if file.endswith('.json'):\n",
    "            source_path = os.path.join(root, file)\n",
    "            print(source_path)\n",
    "            with open(source_path, 'r', encoding='utf-8') as f:\n",
    "                data = json.load(f)\n",
    "                # 获取host ip地址\n",
    "                print()\n",
    "                ip_address = data.get('host')\n",
    "                ip_info = get_ip_info(ip_address)\n",
    "\n",
    "                #print(data)\n",
    "                df = pd.json_normalize(data)\n",
    "                if isinstance(ip_info,dict):\n",
    "                    df['ip是否有效'] = '是'\n",
    "                    df['归属地'] = ip_info.get(\"city\")\n",
    "                    df['地区'] = ip_info.get('regionName')\n",
    "                    df['国家'] = ip_info.get('country')\n",
    "                else:\n",
    "                    df['ip是否有效'] = '否'\n",
    "                    df['归属地'] = ''\n",
    "                    df['地区'] = ''\n",
    "                    df['国家'] = ''\n",
    "                df['文件名称'] = file\n",
    "                df['数据来源'] = source_path\n",
    "                rs_df = pd.concat([rs_df,df])\n",
    "            #     #df.to_excel(os.path.join(root, file.replace('.json', '.xlsx')))\n",
    "            #     #print(f'Successfully converted {file} to xlsx.')\n",
    "\n",
    "            #     #break\n",
    "# 文件名称\t数据来源\n",
    "rs_df_part = rs_df[['host','ip是否有效','归属地','地区','国家','user_name','password','parent_id','secret_key_id','文件名称','数据来源']]\n",
    "output_file_path = os.path.join(target_path,'服务器ip提取数据.xlsx')\n",
    "\n",
    "rs_df.to_excel(r'C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\提取汇总文件\\服务器提取数据.xlsx',index=False)\n",
    "rs_df_part.to_excel(r'C:\\Users\\18027\\Desktop\\工作任务\\提取文件\\提取汇总文件\\服务器ip提取数据.xlsx',index=False)\n",
    "\n",
    "# with pd.ExcelWriter(output_file_path) as writer:\n",
    "#     rs_df.to_excel(output_file_path,sheet_name='1',index=False)\n",
    "#     rs_df_part.to_excel(output_file_path,sheet_name='2',index=False)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests  \n",
    "\n",
    "def get_ip_info(ip_address):  \n",
    "    # 调用 ip-api.com API 获取 IP 信息  \n",
    "    try:  \n",
    "        response = requests.get(f'http://ip-api.com/json/{ip_address}?lang=zh-CN')  \n",
    "        response.raise_for_status()  # 检查请求是否成功  \n",
    "        ip_info = response.json()  \n",
    "        \n",
    "        # 检查 API 返回的状态  \n",
    "        if ip_info['status'] == 'fail':  \n",
    "            return f\"无法获取 IP 地址 {ip_address} 的信息: {ip_info['message']}\"  \n",
    "        \n",
    "        return ip_info  \n",
    "    except requests.exceptions.HTTPError as http_err:  \n",
    "        return f\"HTTP 错误: {http_err}\"  \n",
    "    except Exception as err:  \n",
    "        return f\"发生错误: {err}\"  \n",
    "\n",
    "if __name__ == \"__main__\":  \n",
    "    ip_address = '103.172.41.164' \n",
    "    info = get_ip_info(ip_address)  \n",
    "    \n",
    "    # 输出获取的 IP 信息  \n",
    "    if isinstance(info, dict):  \n",
    "        print(f\"IP: {info.get('query')}\")  \n",
    "        print(f\"城市: {info.get('city')}\")  \n",
    "        print(f\"地区: {info.get('regionName')}\")  \n",
    "        print(f\"国家: {info.get('country')}\")  \n",
    "        print(f\"邮政编码: {info.get('zip')}\")  \n",
    "        print(f\"ISP: {info.get('isp')}\")  \n",
    "    else:  \n",
    "        print(info)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd  \n",
    "import json  \n",
    "def json_to_excel(json_file, excel_file):  \n",
    "    try:  \n",
    "        # 读取 JSON 文件  \n",
    "        with open(json_file, 'r', encoding='utf-8') as file:  \n",
    "            data = json.load(file)  \n",
    "\n",
    "        # 使用 json_normalize 处理复杂 JSON  \n",
    "        df = pd.json_normalize(data)  \n",
    "\n",
    "        # 将 DataFrame 输出到 Excel 文件  \n",
    "        df.to_excel(excel_file, index=False)  \n",
    "\n",
    "        print(f\"成功将 {json_file} 转换为 {excel_file}\")  \n",
    "\n",
    "    except FileNotFoundError:  \n",
    "        print(f\"文件未找到: {json_file}\")  \n",
    "    except json.JSONDecodeError:  \n",
    "        print(\"JSON 解码错误: 请检查 JSON 文件格式\")  \n",
    "    except ValueError as e:  \n",
    "        print(f\"发生 ValueError: {e}\")  \n",
    "    except Exception as e:  \n",
    "        print(f\"发生错误: {e}\")  \n",
    "\n",
    "\n",
    "if __name__ == \"__main__\":  \n",
    "    json_file = r'C:\\Users\\18027\\Desktop\\工作任务\\FinalShell4.3.10\\61.172.229.23_connect_config.json'   # 输入你的 JSON 文件名  \n",
    "    excel_file = r'E:\\Anaconda\\jupyter\\python\\pandas基础及提升\\python提升\\output.xlsx'  # 输出的 Excel 文件名  \n",
    "    json_to_excel(json_file, excel_file)  \n",
    "    print(f\"成功将 {json_file} 转换为 {excel_file}\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
